<ix-fake-progress-bar [loading]="isLoading"></ix-fake-progress-bar>

<h1 matDialogTitle>{{ 'Send Feedback' | translate }}</h1>

<button
  mat-icon-button
  mat-dialog-close
  class="close-feedback-dialog"
  ixTest="close-feedback-dialog"
  [disabled]="isLoading"
  [aria-label]="'Close Feedback Dialog' | translate"
>
  <ix-icon name="clear"></ix-icon>
</button>

@if (isLoadingTypes) {
  <div class="placeholder">
    <ngx-skeleton-loader [count]="3"></ngx-skeleton-loader>
  </div>
} @else {
  @if (allowedTypes.length > 1) {
    <ix-button-group
      class="feedback-type"
      [formControl]="typeControl"
      [label]="'I would like to' | translate"
      [options]="feedbackTypeOptions$"
      [inlineFields]="true"
      [attr.aria-label]="'Feedback Type' | translate"
    ></ix-button-group>
  }
  @if (isReview) {
    <ix-file-review
      [dialogRef]="dialogRef"
      [isLoading]="isLoading"
      (isLoadingChange)="onIsLoadingChange($event)"
    ></ix-file-review>
  } @else {
    @if (isEnterprise$ | async) {
      <ix-file-ticket-licensed
        [dialogRef]="dialogRef"
        [isLoading]="isLoading"
        (isLoadingChange)="onIsLoadingChange($event)"
      ></ix-file-ticket-licensed>
    } @else {
      <ix-file-ticket
        [type]="typeControl.value | cast"
        [dialogRef]="dialogRef"
        [isLoading]="isLoading"
        (isLoadingChange)="onIsLoadingChange($event)"
      ></ix-file-ticket>
    }
  }
}

